-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[OpPerf] Implement remaining nn_conv ops in opperf #17500
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution.
@apeforest Sorry to pick a random PR to comment: import mxnet as mx
from mxnet import nd
from benchmark.opperf.utils.benchmark_utils import run_performance_test
add_res = run_performance_test(nd.add, run_backward=True, dtype='float32', ctx=mx.cpu(),
inputs=[{"lhs": (1024, 1024),
"rhs": (1024, 1024)}],
warmup=10, runs=25) And just get below printings, no performance report: $ python op_benchmark.py
INFO:root:Begin Benchmark - add
INFO:root:Complete Benchmark - add Another question is, the script can only be executed under the root folder of MXNet, right? So users always need to clone MXNet source code to do the benchmarking? |
@TaoLv thanks for giving opperf a try. Jumping in quick to answer your 2 doubts The result is stored in add_res Yes, as it currently stands opperf utility can only be used after cloning the repo and setting the PYTHONPATH to the repo. |
Thank you @ChaiBapchya
It would be better to add
Either explicitly document this requirement in the README or remove this requirement so the users can run benchmark directly after mxnet is pip installed. |
Doesn't this say "add path to your cloned MXNet repository to the PYTHONPATH" I'll add a comment that "explicitly" asks to "clone" the repo.
I will add that print() statement explicitly to README too. Thanks for pointing out. |
CMakeLists.txt
Outdated
@@ -314,6 +314,10 @@ if(USE_MKLDNN) | |||
set(INSTALL_MKLDNN ON) | |||
endif() | |||
|
|||
if(USE_CPP_PACKAGE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change seems unrelated to this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you're right - accidentally brought in external commits due to an incorrect rebase. Will fix ASAP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove unrelated change from this PR. Thx!
@TaoLv As requested, add the 2 changes to my existing PR - |
7fdcb89
to
5bb778b
Compare
@ChaiBapchya Thank you for the quick turn around. It looks good to me. |
1181041
to
8bceeb9
Compare
8bceeb9
to
a32141c
Compare
a32141c
to
23a8808
Compare
Description
This PR serves to implement the remaining operators from the nn_conv category in opperf. To achieve this, I added a call to
run_performance_test
for theROIPooling
op within therun_pooling_operators_benchmarks
function and added therois
argument to the NDArray list indefault_params.py
. SinceROIPooling
was the only remaining op in the convolutional ops category, these were the only changes required.Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments
Tested on p2.16xl w/ubuntu 16.04 and Mac OS with:
run_pooling_operators_benchmarks
- runs all pooling ops (Pooling
andROIPooling
) on relevant dataopperf.py
(full run of all ops)Performance Results
Group of operator test - all Pooling ops (CPU)
Full OpPerf test (CPU)
Group of operator test - all Pooling ops (GPU)
Full OpPerf test (GPU)
@apeforest @access2rohit @ChaiBapchya